﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 练习9
{
    internal class MyStr
    {
        public List<int> listNum;
        int count = 0;        
        public int Count { get => count; set => count = value; }
        public User InstrFindNum(string Instring)
        {
            User user    = new User();
            user.bIsnull = true;
            listNum = new List<int>();
            count = 0;
            if (string.IsNullOrEmpty(Instring)) { user.Msg = "Is Null Or Empty"; return user; }
            for(int i=0;i<Instring.Length;i++){
                if (Instring[i] >= '0' && Instring[i] <= '9') { 
                    count++;
                    listNum.Add(i);
                }
            }
            user.bIsnull = false;
            user.Msg     = "success";
            return user;
        }
    }
}
